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