summaryrefslogtreecommitdiff
path: root/deps/v8/src/runtime/runtime-scopes.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-scopes.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-scopes.cc')
-rw-r--r--deps/v8/src/runtime/runtime-scopes.cc20
1 files changed, 13 insertions, 7 deletions
diff --git a/deps/v8/src/runtime/runtime-scopes.cc b/deps/v8/src/runtime/runtime-scopes.cc
index 2a2ab16d45..cf885ec0d8 100644
--- a/deps/v8/src/runtime/runtime-scopes.cc
+++ b/deps/v8/src/runtime/runtime-scopes.cc
@@ -7,6 +7,7 @@
#include "src/accessors.h"
#include "src/arguments.h"
#include "src/frames-inl.h"
+#include "src/messages.h"
#include "src/runtime/runtime-utils.h"
#include "src/scopeinfo.h"
#include "src/scopes.h"
@@ -239,12 +240,17 @@ RUNTIME_FUNCTION(Runtime_DeclareLookupSlot) {
// TODO(verwaest): This case should probably not be covered by this function,
// but by DeclareGlobals instead.
- if ((attributes != ABSENT && holder->IsJSGlobalObject()) ||
- (context_arg->has_extension() &&
- context_arg->extension()->IsJSGlobalObject())) {
+ if (attributes != ABSENT && holder->IsJSGlobalObject()) {
return DeclareGlobals(isolate, Handle<JSGlobalObject>::cast(holder), name,
value, attr, is_var, is_const, is_function);
}
+ if (context_arg->has_extension() &&
+ context_arg->extension()->IsJSGlobalObject()) {
+ Handle<JSGlobalObject> global(
+ JSGlobalObject::cast(context_arg->extension()), isolate);
+ return DeclareGlobals(isolate, global, name, value, attr, is_var, is_const,
+ is_function);
+ }
if (attributes != ABSENT) {
// The name was declared before; check for conflicting re-declarations.
@@ -662,7 +668,7 @@ RUNTIME_FUNCTION(Runtime_PushWithContext) {
if (!maybe_object.ToHandle(&extension_object)) {
Handle<Object> handle = args.at<Object>(0);
THROW_NEW_ERROR_RETURN_FAILURE(
- isolate, NewTypeError("with_expression", HandleVector(&handle, 1)));
+ isolate, NewTypeError(MessageTemplate::kWithExpression, handle));
}
}
@@ -905,7 +911,7 @@ static ObjectPair LoadLookupSlotHelper(Arguments args, Isolate* isolate,
case IMMUTABLE_CHECK_INITIALIZED_HARMONY:
if (value->IsTheHole()) {
Handle<Object> error = isolate->factory()->NewReferenceError(
- "not_defined", HandleVector(&name, 1));
+ MessageTemplate::kNotDefined, name);
isolate->Throw(*error);
return MakePair(isolate->heap()->exception(), NULL);
}
@@ -953,7 +959,7 @@ static ObjectPair LoadLookupSlotHelper(Arguments args, Isolate* isolate,
if (throw_error) {
// The property doesn't exist - throw exception.
Handle<Object> error = isolate->factory()->NewReferenceError(
- "not_defined", HandleVector(&name, 1));
+ MessageTemplate::kNotDefined, name);
isolate->Throw(*error);
return MakePair(isolate->heap()->exception(), NULL);
} else {
@@ -1015,7 +1021,7 @@ RUNTIME_FUNCTION(Runtime_StoreLookupSlot) {
} else if (is_strict(language_mode)) {
// If absent in strict mode: throw.
THROW_NEW_ERROR_RETURN_FAILURE(
- isolate, NewReferenceError("not_defined", HandleVector(&name, 1)));
+ isolate, NewReferenceError(MessageTemplate::kNotDefined, name));
} else {
// If absent in sloppy mode: add the property to the global object.
object = Handle<JSReceiver>(context->global_object());