Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(413)

Side by Side Diff: src/code-stub-assembler.cc

Issue 2041103007: [es6] Fix prototype chain walk for instanceof. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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/code-stub-assembler.h" 5 #include "src/code-stub-assembler.h"
6 #include "src/code-factory.h" 6 #include "src/code-factory.h"
7 #include "src/frames-inl.h" 7 #include "src/frames-inl.h"
8 #include "src/frames.h" 8 #include "src/frames.h"
9 #include "src/ic/stub-cache.h" 9 #include "src/ic/stub-cache.h"
10 10
(...skipping 1938 matching lines...) Expand 10 before | Expand all | Expand 10 after
1949 Int32Constant(0)), 1949 Int32Constant(0)),
1950 &return_runtime); 1950 &return_runtime);
1951 1951
1952 // Check if the current {object} is a proxy. 1952 // Check if the current {object} is a proxy.
1953 Node* object_instance_type = LoadMapInstanceType(object_map); 1953 Node* object_instance_type = LoadMapInstanceType(object_map);
1954 GotoIf(Word32Equal(object_instance_type, Int32Constant(JS_PROXY_TYPE)), 1954 GotoIf(Word32Equal(object_instance_type, Int32Constant(JS_PROXY_TYPE)),
1955 &return_runtime); 1955 &return_runtime);
1956 1956
1957 // Check the current {object} prototype. 1957 // Check the current {object} prototype.
1958 Node* object_prototype = LoadMapPrototype(object_map); 1958 Node* object_prototype = LoadMapPrototype(object_map);
1959 GotoIf(WordEqual(object_prototype, NullConstant()), &return_false);
1959 GotoIf(WordEqual(object_prototype, callable_prototype), &return_true); 1960 GotoIf(WordEqual(object_prototype, callable_prototype), &return_true);
1960 GotoIf(WordEqual(object_prototype, NullConstant()), &return_false);
1961 1961
1962 // Continue with the prototype. 1962 // Continue with the prototype.
1963 var_object_map.Bind(LoadMap(object_prototype)); 1963 var_object_map.Bind(LoadMap(object_prototype));
1964 Goto(&loop); 1964 Goto(&loop);
1965 } 1965 }
1966 1966
1967 Bind(&return_true); 1967 Bind(&return_true);
1968 StoreRoot(Heap::kInstanceofCacheAnswerRootIndex, BooleanConstant(true)); 1968 StoreRoot(Heap::kInstanceofCacheAnswerRootIndex, BooleanConstant(true));
1969 var_result.Bind(BooleanConstant(true)); 1969 var_result.Bind(BooleanConstant(true));
1970 Goto(&return_result); 1970 Goto(&return_result);
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
2301 Code::Flags code_flags = 2301 Code::Flags code_flags =
2302 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::LOAD_IC)); 2302 Code::RemoveHolderFromFlags(Code::ComputeHandlerFlags(Code::LOAD_IC));
2303 2303
2304 TryProbeStubCache(isolate()->stub_cache(), code_flags, p->receiver, p->name, 2304 TryProbeStubCache(isolate()->stub_cache(), code_flags, p->receiver, p->name,
2305 &if_handler, &var_handler, if_miss); 2305 &if_handler, &var_handler, if_miss);
2306 } 2306 }
2307 } 2307 }
2308 2308
2309 } // namespace internal 2309 } // namespace internal
2310 } // namespace v8 2310 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/js-typed-lowering.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698