35 static void WriteRinfo(RelocInfoWriter* writer,
36 byte*
pc, RelocInfo::Mode mode, intptr_t data) {
37 RelocInfo rinfo(pc, mode, data,
NULL);
38 writer->Write(&rinfo);
45 const int code_size = 10 *
KB;
46 int relocation_info_size = 10 *
KB;
47 const int buffer_size = code_size + relocation_info_size;
51 byte* buffer_end = *buffer + buffer_size;
53 RelocInfoWriter writer(buffer_end, pc);
54 byte* relocation_info_end = buffer_end - relocation_info_size;
55 for (
int i = 0, pos = 0; i < 100; i++, pc += i, pos += i) {
56 RelocInfo::Mode mode = (i % 2 == 0) ?
57 RelocInfo::STATEMENT_POSITION : RelocInfo::POSITION;
58 WriteRinfo(&writer, pc, mode, pos);
59 CHECK(writer.pos() - RelocInfoWriter::kMaxSize >= relocation_info_end);
62 relocation_info_size =
static_cast<int>(buffer_end - writer.pos());
63 CodeDesc desc = { *buffer, buffer_size, code_size,
64 relocation_info_size,
NULL };
68 RelocIterator it(desc, RelocInfo::ModeMask(RelocInfo::POSITION));
70 for (
int i = 0, pos = 0; i < 100; i++, pc += i, pos += i) {
71 RelocInfo::Mode mode = (i % 2 == 0) ?
72 RelocInfo::STATEMENT_POSITION : RelocInfo::POSITION;
73 if (mode == RelocInfo::POSITION) {
85 RelocIterator it(desc, RelocInfo::ModeMask(RelocInfo::STATEMENT_POSITION));
87 for (
int i = 0, pos = 0; i < 100; i++, pc += i, pos += i) {
88 RelocInfo::Mode mode = (i % 2 == 0) ?
89 RelocInfo::STATEMENT_POSITION : RelocInfo::POSITION;
90 if (mode == RelocInfo::STATEMENT_POSITION) {
104 for (
int i = 0, pos = 0; i < 100; i++, pc += i, pos += i) {
105 RelocInfo::Mode mode = (i % 2 == 0) ?
106 RelocInfo::STATEMENT_POSITION : RelocInfo::POSITION;
#define CHECK_EQ(expected, value)
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination trace on stack replacement optimize closures functions with arguments object optimize functions containing for in loops profiler considers IC stability primitive functions trigger their own optimization re try self optimization if it failed insert an interrupt check at function exit execution budget before interrupt is triggered call count before self optimization self_optimization count_based_interrupts weighted_back_edges trace_opt emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 enable use of ARMv7 instructions if enable use of MIPS FPU instructions if NULL