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