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

Side by Side Diff: src/runtime/runtime-compiler.cc

Issue 1563213002: Type Feedback Vector lives in the closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Ports. Created 4 years, 11 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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/runtime/runtime-utils.h" 5 #include "src/runtime/runtime-utils.h"
6 6
7 #include "src/arguments.h" 7 #include "src/arguments.h"
8 #include "src/compiler.h" 8 #include "src/compiler.h"
9 #include "src/deoptimizer.h" 9 #include "src/deoptimizer.h"
10 #include "src/frames-inl.h" 10 #include "src/frames-inl.h"
(...skipping 22 matching lines...) Expand all
33 33
34 // Compile the target function. 34 // Compile the target function.
35 DCHECK(function->shared()->allows_lazy_compilation()); 35 DCHECK(function->shared()->allows_lazy_compilation());
36 36
37 Handle<Code> code; 37 Handle<Code> code;
38 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, code, 38 ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, code,
39 Compiler::GetLazyCode(function)); 39 Compiler::GetLazyCode(function));
40 DCHECK(code->IsJavaScriptCode()); 40 DCHECK(code->IsJavaScriptCode());
41 41
42 function->ReplaceCode(*code); 42 function->ReplaceCode(*code);
43 JSFunction::EnsureLiterals(function);
43 return *code; 44 return *code;
44 } 45 }
45 46
46 47
47 namespace { 48 namespace {
48 49
49 Object* CompileOptimized(Isolate* isolate, Handle<JSFunction> function, 50 Object* CompileOptimized(Isolate* isolate, Handle<JSFunction> function,
50 Compiler::ConcurrencyMode mode) { 51 Compiler::ConcurrencyMode mode) {
51 StackLimitCheck check(isolate); 52 StackLimitCheck check(isolate);
52 if (check.JsHasOverflowed(1 * KB)) return isolate->StackOverflow(); 53 if (check.JsHasOverflowed(1 * KB)) return isolate->StackOverflow();
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 DCHECK(is_valid_language_mode(args.smi_at(3))); 425 DCHECK(is_valid_language_mode(args.smi_at(3)));
425 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3)); 426 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3));
426 DCHECK(args[4]->IsSmi()); 427 DCHECK(args[4]->IsSmi());
427 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(), 428 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(),
428 isolate); 429 isolate);
429 return CompileGlobalEval(isolate, args.at<String>(1), outer_info, 430 return CompileGlobalEval(isolate, args.at<String>(1), outer_info,
430 language_mode, args.smi_at(4)); 431 language_mode, args.smi_at(4));
431 } 432 }
432 } // namespace internal 433 } // namespace internal
433 } // namespace v8 434 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698