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

Side by Side Diff: src/full-codegen/full-codegen.cc

Issue 1476763002: Make whether or not a Code object should be created by masm explicit (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: enum class FTW Created 5 years 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/deoptimizer.cc ('k') | src/ia32/codegen-ia32.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/full-codegen/full-codegen.h" 5 #include "src/full-codegen/full-codegen.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 20 matching lines...) Expand all
31 // Ensure that the feedback vector is large enough. 31 // Ensure that the feedback vector is large enough.
32 info->EnsureFeedbackVector(); 32 info->EnsureFeedbackVector();
33 33
34 Handle<Script> script = info->script(); 34 Handle<Script> script = info->script();
35 if (!script->IsUndefined() && !script->source()->IsUndefined()) { 35 if (!script->IsUndefined() && !script->source()->IsUndefined()) {
36 int len = String::cast(script->source())->length(); 36 int len = String::cast(script->source())->length();
37 isolate->counters()->total_full_codegen_source_size()->Increment(len); 37 isolate->counters()->total_full_codegen_source_size()->Increment(len);
38 } 38 }
39 CodeGenerator::MakeCodePrologue(info, "full"); 39 CodeGenerator::MakeCodePrologue(info, "full");
40 const int kInitialBufferSize = 4 * KB; 40 const int kInitialBufferSize = 4 * KB;
41 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize); 41 MacroAssembler masm(info->isolate(), NULL, kInitialBufferSize,
42 CodeObjectRequired::kYes);
42 if (info->will_serialize()) masm.enable_serializer(); 43 if (info->will_serialize()) masm.enable_serializer();
43 44
44 LOG_CODE_EVENT(isolate, 45 LOG_CODE_EVENT(isolate,
45 CodeStartLinePosInfoRecordEvent(masm.positions_recorder())); 46 CodeStartLinePosInfoRecordEvent(masm.positions_recorder()));
46 47
47 FullCodeGenerator cgen(&masm, info); 48 FullCodeGenerator cgen(&masm, info);
48 cgen.Generate(); 49 cgen.Generate();
49 if (cgen.HasStackOverflow()) { 50 if (cgen.HasStackOverflow()) {
50 DCHECK(!isolate->has_pending_exception()); 51 DCHECK(!isolate->has_pending_exception());
51 return false; 52 return false;
(...skipping 1684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1736 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() || 1737 return var->mode() == CONST_LEGACY || var->scope()->is_nonlinear() ||
1737 var->initializer_position() >= proxy->position(); 1738 var->initializer_position() >= proxy->position();
1738 } 1739 }
1739 1740
1740 1741
1741 #undef __ 1742 #undef __
1742 1743
1743 1744
1744 } // namespace internal 1745 } // namespace internal
1745 } // namespace v8 1746 } // namespace v8
OLDNEW
« no previous file with comments | « src/deoptimizer.cc ('k') | src/ia32/codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698