summaryrefslogtreecommitdiff
path: root/deps/v8/src/runtime/runtime-compiler.cc
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2015-06-19 13:23:56 +0200
committerRod Vagg <rod@vagg.org>2015-08-04 11:56:14 -0700
commit70d1f32f5605465a1a630a64f6f0d35f96c7709d (patch)
tree0a349040a686eafcb0a09943ebc733477dce2781 /deps/v8/src/runtime/runtime-compiler.cc
parent4643b8b6671607a7aff60cbbd0b384dcf2f6959e (diff)
downloadnode-new-70d1f32f5605465a1a630a64f6f0d35f96c7709d.tar.gz
deps: update v8 to 4.4.63.9
Upgrade the bundled V8 and update code in src/ and lib/ to the new API. Notable backwards incompatible changes are the removal of the smalloc module and dropped support for CESU-8 decoding. CESU-8 support can be brought back if necessary by doing UTF-8 decoding ourselves. This commit includes https://codereview.chromium.org/1192973004 to fix a build error on python 2.6 systems. The original commit log follows: Use optparse in js2c.py for python compatibility Without this change, V8 won't build on RHEL/CentOS 6 because the distro python is too old to know about the argparse module. PR-URL: https://github.com/nodejs/io.js/pull/2022 Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Trevor Norris <trev.norris@gmail.com>
Diffstat (limited to 'deps/v8/src/runtime/runtime-compiler.cc')
-rw-r--r--deps/v8/src/runtime/runtime-compiler.cc28
1 files changed, 10 insertions, 18 deletions
diff --git a/deps/v8/src/runtime/runtime-compiler.cc b/deps/v8/src/runtime/runtime-compiler.cc
index 52fe1e7a8b..3b37bda125 100644
--- a/deps/v8/src/runtime/runtime-compiler.cc
+++ b/deps/v8/src/runtime/runtime-compiler.cc
@@ -9,7 +9,7 @@
#include "src/deoptimizer.h"
#include "src/frames.h"
#include "src/full-codegen.h"
-#include "src/isolate-inl.h"
+#include "src/messages.h"
#include "src/runtime/runtime-utils.h"
#include "src/v8threads.h"
#include "src/vm-state-inl.h"
@@ -232,8 +232,9 @@ RUNTIME_FUNCTION(Runtime_CompileForOnStackReplacement) {
// Gate the OSR entry with a stack check.
BackEdgeTable::AddStackCheck(caller_code, pc_offset);
// Poll already queued compilation jobs.
- OptimizingCompilerThread* thread = isolate->optimizing_compiler_thread();
- if (thread->IsQueuedForOSR(function, ast_id)) {
+ OptimizingCompileDispatcher* dispatcher =
+ isolate->optimizing_compile_dispatcher();
+ if (dispatcher->IsQueuedForOSR(function, ast_id)) {
if (FLAG_trace_osr) {
PrintF("[OSR - Still waiting for queued: ");
function->PrintName();
@@ -242,7 +243,7 @@ RUNTIME_FUNCTION(Runtime_CompileForOnStackReplacement) {
return NULL;
}
- job = thread->FindReadyOSRCandidate(function, ast_id);
+ job = dispatcher->FindReadyOSRCandidate(function, ast_id);
}
if (job != NULL) {
@@ -324,7 +325,7 @@ RUNTIME_FUNCTION(Runtime_TryInstallOptimizedCode) {
return isolate->StackOverflow();
}
- isolate->optimizing_compiler_thread()->InstallOptimizedFunctions();
+ isolate->optimizing_compile_dispatcher()->InstallOptimizedFunctions();
return (function->IsOptimized()) ? function->code()
: function->shared()->code();
}
@@ -349,10 +350,9 @@ bool CodeGenerationFromStringsAllowed(Isolate* isolate,
RUNTIME_FUNCTION(Runtime_CompileString) {
HandleScope scope(isolate);
- DCHECK(args.length() == 3);
+ DCHECK(args.length() == 2);
CONVERT_ARG_HANDLE_CHECKED(String, source, 0);
CONVERT_BOOLEAN_ARG_CHECKED(function_literal_only, 1);
- CONVERT_SMI_ARG_CHECKED(source_offset, 2);
// Extract native context.
Handle<Context> context(isolate->native_context());
@@ -364,8 +364,8 @@ RUNTIME_FUNCTION(Runtime_CompileString) {
Handle<Object> error_message =
context->ErrorMessageForCodeGenerationFromStrings();
THROW_NEW_ERROR_RETURN_FAILURE(
- isolate, NewEvalError("code_gen_from_strings",
- HandleVector<Object>(&error_message, 1)));
+ isolate,
+ NewEvalError(MessageTemplate::kCodeGenFromStrings, error_message));
}
// Compile source string in the native context.
@@ -378,14 +378,6 @@ RUNTIME_FUNCTION(Runtime_CompileString) {
isolate, fun,
Compiler::GetFunctionFromEval(source, outer_info, context, SLOPPY,
restriction, RelocInfo::kNoPosition));
- if (function_literal_only) {
- // The actual body is wrapped, which shifts line numbers.
- Handle<Script> script(Script::cast(fun->shared()->script()), isolate);
- if (script->line_offset() == 0) {
- int line_num = Script::GetLineNumber(script, source_offset);
- script->set_line_offset(Smi::FromInt(-line_num));
- }
- }
return *fun;
}
@@ -406,7 +398,7 @@ static ObjectPair CompileGlobalEval(Isolate* isolate, Handle<String> source,
native_context->ErrorMessageForCodeGenerationFromStrings();
Handle<Object> error;
MaybeHandle<Object> maybe_error = isolate->factory()->NewEvalError(
- "code_gen_from_strings", HandleVector<Object>(&error_message, 1));
+ MessageTemplate::kCodeGenFromStrings, error_message);
if (maybe_error.ToHandle(&error)) isolate->Throw(*error);
return MakePair(isolate->heap()->exception(), NULL);
}