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

Side by Side Diff: src/compiler.cc

Issue 2744613006: [object] Add Script::IsUserJavaScript(). (Closed)
Patch Set: Rebase. Created 3 years, 9 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/api.cc ('k') | src/debug/debug.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/compiler.h" 5 #include "src/compiler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/asmjs/asm-js.h" 10 #include "src/asmjs/asm-js.h"
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 Compiler::EagerInnerFunctionLiterals* eager_literals) { 478 Compiler::EagerInnerFunctionLiterals* eager_literals) {
479 RuntimeCallTimerScope runtimeTimer(parse_info->isolate(), 479 RuntimeCallTimerScope runtimeTimer(parse_info->isolate(),
480 &RuntimeCallStats::CompileRenumber); 480 &RuntimeCallStats::CompileRenumber);
481 481
482 // CollectTypeProfile uses its own feedback slots. If we have existing 482 // CollectTypeProfile uses its own feedback slots. If we have existing
483 // FeedbackMetadata, we can only collect type profile, if the feedback vector 483 // FeedbackMetadata, we can only collect type profile, if the feedback vector
484 // has the appropriate slots. 484 // has the appropriate slots.
485 bool collect_type_profile; 485 bool collect_type_profile;
486 if (parse_info->shared_info().is_null() || 486 if (parse_info->shared_info().is_null() ||
487 parse_info->shared_info()->feedback_metadata()->length() == 0) { 487 parse_info->shared_info()->feedback_metadata()->length() == 0) {
488 collect_type_profile = FLAG_type_profile && 488 collect_type_profile =
489 parse_info->script()->type() == Script::TYPE_NORMAL; 489 FLAG_type_profile && parse_info->script()->IsUserJavaScript();
490 } else { 490 } else {
491 collect_type_profile = 491 collect_type_profile =
492 parse_info->shared_info()->feedback_metadata()->HasTypeProfileSlot(); 492 parse_info->shared_info()->feedback_metadata()->HasTypeProfileSlot();
493 } 493 }
494 494
495 if (!AstNumbering::Renumber( 495 if (!AstNumbering::Renumber(
496 parse_info->isolate()->stack_guard()->real_climit(), 496 parse_info->isolate()->stack_guard()->real_climit(),
497 parse_info->zone(), parse_info->literal(), eager_literals, 497 parse_info->zone(), parse_info->literal(), eager_literals,
498 collect_type_profile)) { 498 collect_type_profile)) {
499 return false; 499 return false;
(...skipping 1468 matching lines...) Expand 10 before | Expand all | Expand 10 after
1968 } 1968 }
1969 1969
1970 if (shared->is_compiled()) { 1970 if (shared->is_compiled()) {
1971 // TODO(mvstanton): pass pretenure flag to EnsureLiterals. 1971 // TODO(mvstanton): pass pretenure flag to EnsureLiterals.
1972 JSFunction::EnsureLiterals(function); 1972 JSFunction::EnsureLiterals(function);
1973 } 1973 }
1974 } 1974 }
1975 1975
1976 } // namespace internal 1976 } // namespace internal
1977 } // namespace v8 1977 } // namespace v8
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/debug/debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698