OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 92 |
93 void LCodeGen::FinishCode(Handle<Code> code) { | 93 void LCodeGen::FinishCode(Handle<Code> code) { |
94 ASSERT(is_done()); | 94 ASSERT(is_done()); |
95 code->set_stack_slots(GetStackSlotCount()); | 95 code->set_stack_slots(GetStackSlotCount()); |
96 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); | 96 code->set_safepoint_table_offset(safepoints_.GetCodeOffset()); |
97 PopulateDeoptimizationData(code); | 97 PopulateDeoptimizationData(code); |
98 Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(code); | 98 Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(code); |
99 } | 99 } |
100 | 100 |
101 | 101 |
102 void LCodeGen::Abort(const char* format, ...) { | 102 void LCodeGen::Abort(const char* reason) { |
103 if (FLAG_trace_bailout) { | 103 info()->set_bailout_reason(reason); |
104 SmartArrayPointer<char> name( | |
105 info()->shared_info()->DebugName()->ToCString()); | |
106 PrintF("Aborting LCodeGen in @\"%s\": ", *name); | |
107 va_list arguments; | |
108 va_start(arguments, format); | |
109 OS::VPrint(format, arguments); | |
110 va_end(arguments); | |
111 PrintF("\n"); | |
112 } | |
113 status_ = ABORTED; | 104 status_ = ABORTED; |
114 } | 105 } |
115 | 106 |
116 | 107 |
117 void LCodeGen::Comment(const char* format, ...) { | 108 void LCodeGen::Comment(const char* format, ...) { |
118 if (!FLAG_code_comments) return; | 109 if (!FLAG_code_comments) return; |
119 char buffer[4 * KB]; | 110 char buffer[4 * KB]; |
120 StringBuilder builder(buffer, ARRAY_SIZE(buffer)); | 111 StringBuilder builder(buffer, ARRAY_SIZE(buffer)); |
121 va_list arguments; | 112 va_list arguments; |
122 va_start(arguments, format); | 113 va_start(arguments, format); |
(...skipping 5381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5504 FixedArray::kHeaderSize - kPointerSize)); | 5495 FixedArray::kHeaderSize - kPointerSize)); |
5505 __ bind(&done); | 5496 __ bind(&done); |
5506 } | 5497 } |
5507 | 5498 |
5508 | 5499 |
5509 #undef __ | 5500 #undef __ |
5510 | 5501 |
5511 } } // namespace v8::internal | 5502 } } // namespace v8::internal |
5512 | 5503 |
5513 #endif // V8_TARGET_ARCH_IA32 | 5504 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |