summaryrefslogtreecommitdiff
path: root/deps/v8/src/debug/debug-evaluate.cc
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2018-03-07 08:54:53 +0100
committerMichaël Zasso <targos@protonmail.com>2018-03-07 16:48:52 +0100
commit88786fecff336342a56e6f2e7ff3b286be716e47 (patch)
tree92e6ba5b8ac8dae1a058988d20c9d27bfa654390 /deps/v8/src/debug/debug-evaluate.cc
parent4e86f9b5ab83cbabf43839385bf383e6a7ef7d19 (diff)
downloadnode-new-88786fecff336342a56e6f2e7ff3b286be716e47.tar.gz
deps: update V8 to 6.5.254.31
PR-URL: https://github.com/nodejs/node/pull/18453 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yang Guo <yangguo@chromium.org> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'deps/v8/src/debug/debug-evaluate.cc')
-rw-r--r--deps/v8/src/debug/debug-evaluate.cc38
1 files changed, 26 insertions, 12 deletions
diff --git a/deps/v8/src/debug/debug-evaluate.cc b/deps/v8/src/debug/debug-evaluate.cc
index b6e3f14ed1..33bc81e5f7 100644
--- a/deps/v8/src/debug/debug-evaluate.cc
+++ b/deps/v8/src/debug/debug-evaluate.cc
@@ -16,6 +16,7 @@
#include "src/interpreter/bytecode-array-iterator.h"
#include "src/interpreter/bytecodes.h"
#include "src/isolate-inl.h"
+#include "src/snapshot/snapshot.h"
namespace v8 {
namespace internal {
@@ -58,13 +59,6 @@ MaybeHandle<Object> DebugEvaluate::Local(Isolate* isolate,
if (!it.is_javascript()) return isolate->factory()->undefined_value();
JavaScriptFrame* frame = it.javascript_frame();
- // Traverse the saved contexts chain to find the active context for the
- // selected frame.
- SaveContext* save =
- DebugFrameHelper::FindSavedContextForFrame(isolate, frame);
- SaveContext savex(isolate);
- isolate->set_context(*(save->context()));
-
// This is not a lot different than DebugEvaluate::Global, except that
// variables accessible by the function we are evaluating from are
// materialized and included on top of the native context. Changes to
@@ -284,7 +278,7 @@ bool IntrinsicHasNoSideEffect(Runtime::FunctionId id) {
V(ToString) \
V(ToLength) \
V(ToNumber) \
- V(NumberToString) \
+ V(NumberToStringSkipCache) \
/* Type checks */ \
V(IsJSReceiver) \
V(IsSmi) \
@@ -349,7 +343,11 @@ bool IntrinsicHasNoSideEffect(Runtime::FunctionId id) {
V(AllocateSeqOneByteString) \
V(AllocateSeqTwoByteString) \
V(ObjectCreate) \
+ V(ObjectEntries) \
+ V(ObjectEntriesSkipFastPath) \
V(ObjectHasOwnProperty) \
+ V(ObjectValues) \
+ V(ObjectValuesSkipFastPath) \
V(ArrayIndexOf) \
V(ArrayIncludes_Slow) \
V(ArrayIsArray) \
@@ -361,6 +359,7 @@ bool IntrinsicHasNoSideEffect(Runtime::FunctionId id) {
V(ThrowRangeError) \
V(ToName) \
V(GetOwnPropertyDescriptor) \
+ V(StackGuard) \
/* Misc. */ \
V(Call) \
V(MaxSmi) \
@@ -522,6 +521,8 @@ bool BuiltinHasNoSideEffect(Builtins::Name id) {
case Builtins::kArrayPrototypeValues:
case Builtins::kArrayIncludes:
case Builtins::kArrayPrototypeEntries:
+ case Builtins::kArrayPrototypeFind:
+ case Builtins::kArrayPrototypeFindIndex:
case Builtins::kArrayPrototypeKeys:
case Builtins::kArrayForEach:
case Builtins::kArrayEvery:
@@ -751,16 +752,29 @@ bool DebugEvaluate::FunctionHasNoSideEffect(Handle<SharedFunctionInfo> info) {
? info->lazy_deserialization_builtin_id()
: info->code()->builtin_index();
DCHECK_NE(Builtins::kDeserializeLazy, builtin_index);
- if (builtin_index >= 0 && builtin_index < Builtins::builtin_count &&
+ if (Builtins::IsBuiltinId(builtin_index) &&
BuiltinHasNoSideEffect(static_cast<Builtins::Name>(builtin_index))) {
#ifdef DEBUG
- if (info->code()->builtin_index() == Builtins::kDeserializeLazy) {
- return true; // Target builtin is not yet deserialized.
+ Isolate* isolate = info->GetIsolate();
+ Code* code = isolate->builtins()->builtin(builtin_index);
+ if (code->builtin_index() == Builtins::kDeserializeLazy) {
+ // Target builtin is not yet deserialized. Deserialize it now.
+
+ DCHECK(Builtins::IsLazy(builtin_index));
+ DCHECK_EQ(Builtins::TFJ, Builtins::KindOf(builtin_index));
+
+ if (FLAG_trace_lazy_deserialization) {
+ PrintF("Lazy-deserializing builtin %s\n",
+ Builtins::name(builtin_index));
+ }
+
+ code = Snapshot::DeserializeBuiltin(isolate, builtin_index);
+ DCHECK_NE(Builtins::kDeserializeLazy, code->builtin_index());
}
// TODO(yangguo): Check builtin-to-builtin calls too.
int mode = RelocInfo::ModeMask(RelocInfo::EXTERNAL_REFERENCE);
bool failed = false;
- for (RelocIterator it(info->code(), mode); !it.done(); it.next()) {
+ for (RelocIterator it(code, mode); !it.done(); it.next()) {
RelocInfo* rinfo = it.rinfo();
Address address = rinfo->target_external_reference();
const Runtime::Function* function = Runtime::FunctionForEntry(address);