Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Side by Side Diff: src/codegen.cc

Issue 2900683002: [compiler] Delay allocation of code-embedded heap numbers. (Closed)
Patch Set: Fix rebase. Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/compiler/arm/code-generator-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/codegen.h" 5 #include "src/codegen.h"
6 6
7 #if defined(V8_OS_AIX) 7 #if defined(V8_OS_AIX)
8 #include <fenv.h> // NOLINT(build/c++11) 8 #include <fenv.h> // NOLINT(build/c++11)
9 #endif 9 #endif
10 10
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 CompilationInfo* info, 115 CompilationInfo* info,
116 Handle<Object> self_reference) { 116 Handle<Object> self_reference) {
117 Isolate* isolate = info->isolate(); 117 Isolate* isolate = info->isolate();
118 118
119 // Allocate and install the code. 119 // Allocate and install the code.
120 CodeDesc desc; 120 CodeDesc desc;
121 Code::Flags flags = info->code_flags(); 121 Code::Flags flags = info->code_flags();
122 bool is_crankshafted = 122 bool is_crankshafted =
123 Code::ExtractKindFromFlags(flags) == Code::OPTIMIZED_FUNCTION || 123 Code::ExtractKindFromFlags(flags) == Code::OPTIMIZED_FUNCTION ||
124 info->IsStub(); 124 info->IsStub();
125 masm->GetCode(&desc); 125 masm->GetCode(isolate, &desc);
126 if (eh_frame_writer) eh_frame_writer->GetEhFrame(&desc); 126 if (eh_frame_writer) eh_frame_writer->GetEhFrame(&desc);
127 127
128 Handle<Code> code = isolate->factory()->NewCode( 128 Handle<Code> code = isolate->factory()->NewCode(
129 desc, flags, self_reference, false, is_crankshafted, 129 desc, flags, self_reference, false, is_crankshafted,
130 info->prologue_offset(), info->is_debug() && !is_crankshafted); 130 info->prologue_offset(), info->is_debug() && !is_crankshafted);
131 isolate->counters()->total_compiled_code_size()->Increment( 131 isolate->counters()->total_compiled_code_size()->Increment(
132 code->instruction_size()); 132 code->instruction_size());
133 return code; 133 return code;
134 } 134 }
135 135
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 os << "source_position = " << shared->start_position() << "\n"; 280 os << "source_position = " << shared->start_position() << "\n";
281 } 281 }
282 code->Disassemble(debug_name.get(), os); 282 code->Disassemble(debug_name.get(), os);
283 os << "--- End code ---\n"; 283 os << "--- End code ---\n";
284 } 284 }
285 #endif // ENABLE_DISASSEMBLER 285 #endif // ENABLE_DISASSEMBLER
286 } 286 }
287 287
288 } // namespace internal 288 } // namespace internal
289 } // namespace v8 289 } // namespace v8
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/compiler/arm/code-generator-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698