OLD | NEW |
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/asmjs/asm-js.h" | 8 #include "src/asmjs/asm-js.h" |
9 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h" | 9 #include "src/compiler-dispatcher/optimizing-compile-dispatcher.h" |
10 #include "src/compiler.h" | 10 #include "src/compiler.h" |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 MessageTemplate::kCodeGenFromStrings, error_message); | 435 MessageTemplate::kCodeGenFromStrings, error_message); |
436 if (maybe_error.ToHandle(&error)) isolate->Throw(*error); | 436 if (maybe_error.ToHandle(&error)) isolate->Throw(*error); |
437 return isolate->heap()->exception(); | 437 return isolate->heap()->exception(); |
438 } | 438 } |
439 | 439 |
440 // Deal with a normal eval call with a string argument. Compile it | 440 // Deal with a normal eval call with a string argument. Compile it |
441 // and return the compiled function bound in the local context. | 441 // and return the compiled function bound in the local context. |
442 static const ParseRestriction restriction = NO_PARSE_RESTRICTION; | 442 static const ParseRestriction restriction = NO_PARSE_RESTRICTION; |
443 Handle<JSFunction> compiled; | 443 Handle<JSFunction> compiled; |
444 ASSIGN_RETURN_ON_EXCEPTION_VALUE( | 444 ASSIGN_RETURN_ON_EXCEPTION_VALUE( |
445 isolate, compiled, Compiler::GetFunctionFromEval( | 445 isolate, compiled, |
446 source, outer_info, context, language_mode, | 446 Compiler::GetFunctionFromEval(source, outer_info, context, language_mode, |
447 restriction, eval_scope_position, eval_position), | 447 restriction, kNoSourcePosition, |
| 448 eval_scope_position, eval_position), |
448 isolate->heap()->exception()); | 449 isolate->heap()->exception()); |
449 return *compiled; | 450 return *compiled; |
450 } | 451 } |
451 | 452 |
452 | 453 |
453 RUNTIME_FUNCTION(Runtime_ResolvePossiblyDirectEval) { | 454 RUNTIME_FUNCTION(Runtime_ResolvePossiblyDirectEval) { |
454 HandleScope scope(isolate); | 455 HandleScope scope(isolate); |
455 DCHECK(args.length() == 6); | 456 DCHECK(args.length() == 6); |
456 | 457 |
457 Handle<Object> callee = args.at<Object>(0); | 458 Handle<Object> callee = args.at<Object>(0); |
(...skipping 12 matching lines...) Expand all Loading... |
470 DCHECK(is_valid_language_mode(args.smi_at(3))); | 471 DCHECK(is_valid_language_mode(args.smi_at(3))); |
471 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3)); | 472 LanguageMode language_mode = static_cast<LanguageMode>(args.smi_at(3)); |
472 DCHECK(args[4]->IsSmi()); | 473 DCHECK(args[4]->IsSmi()); |
473 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(), | 474 Handle<SharedFunctionInfo> outer_info(args.at<JSFunction>(2)->shared(), |
474 isolate); | 475 isolate); |
475 return CompileGlobalEval(isolate, args.at<String>(1), outer_info, | 476 return CompileGlobalEval(isolate, args.at<String>(1), outer_info, |
476 language_mode, args.smi_at(4), args.smi_at(5)); | 477 language_mode, args.smi_at(4), args.smi_at(5)); |
477 } | 478 } |
478 } // namespace internal | 479 } // namespace internal |
479 } // namespace v8 | 480 } // namespace v8 |
OLD | NEW |