OLD | NEW |
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/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/ast.h" | 7 #include "src/ast.h" |
8 #include "src/ast-numbering.h" | 8 #include "src/ast-numbering.h" |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 void BreakableStatementChecker::VisitSuperReference(SuperReference* expr) {} | 301 void BreakableStatementChecker::VisitSuperReference(SuperReference* expr) {} |
302 | 302 |
303 | 303 |
304 #define __ ACCESS_MASM(masm()) | 304 #define __ ACCESS_MASM(masm()) |
305 | 305 |
306 bool FullCodeGenerator::MakeCode(CompilationInfo* info) { | 306 bool FullCodeGenerator::MakeCode(CompilationInfo* info) { |
307 Isolate* isolate = info->isolate(); | 307 Isolate* isolate = info->isolate(); |
308 | 308 |
309 TimerEventScope<TimerEventCompileFullCode> timer(info->isolate()); | 309 TimerEventScope<TimerEventCompileFullCode> timer(info->isolate()); |
310 | 310 |
311 if (!AstNumbering::Renumber(info->function(), info->zone())) { | |
312 DCHECK(!isolate->has_pending_exception()); | |
313 return false; | |
314 } | |
315 | |
316 Handle<Script> script = info->script(); | 311 Handle<Script> script = info->script(); |
317 if (!script->IsUndefined() && !script->source()->IsUndefined()) { | 312 if (!script->IsUndefined() && !script->source()->IsUndefined()) { |
318 int len = String::cast(script->source())->length(); | 313 int len = String::cast(script->source())->length(); |
319 isolate->counters()->total_full_codegen_source_size()->Increment(len); | 314 isolate->counters()->total_full_codegen_source_size()->Increment(len); |
320 } | 315 } |
321 CodeGenerator::MakeCodePrologue(info, "full"); | 316 CodeGenerator::MakeCodePrologue(info, "full"); |
322 const int kInitialBufferSize = 4 * KB; | 317 const int kInitialBufferSize = 4 * KB; |
323 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize); | 318 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize); |
324 if (info->will_serialize()) masm.enable_serializer(); | 319 if (info->will_serialize()) masm.enable_serializer(); |
325 | 320 |
(...skipping 1425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1751 } | 1746 } |
1752 return true; | 1747 return true; |
1753 } | 1748 } |
1754 #endif // DEBUG | 1749 #endif // DEBUG |
1755 | 1750 |
1756 | 1751 |
1757 #undef __ | 1752 #undef __ |
1758 | 1753 |
1759 | 1754 |
1760 } } // namespace v8::internal | 1755 } } // namespace v8::internal |
OLD | NEW |