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

Unified Diff: src/code-stub-assembler.cc

Issue 2853393002: [builtins] Migrate Object.keys to CodeStubAssembler builtin. (Closed)
Patch Set: Really fix the test, meh. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stub-assembler.cc
diff --git a/src/code-stub-assembler.cc b/src/code-stub-assembler.cc
index 94567c824c73feaad3b03abc146e265f98edfaae..fb84c70f9f15f0614af5857a9615ed7d0cdb610f 100644
--- a/src/code-stub-assembler.cc
+++ b/src/code-stub-assembler.cc
@@ -3176,20 +3176,23 @@ Node* CodeStubAssembler::IsJSReceiverInstanceType(Node* instance_type) {
Int32Constant(FIRST_JS_RECEIVER_TYPE));
}
+Node* CodeStubAssembler::IsJSReceiverMap(Node* map) {
+ return IsJSReceiverInstanceType(LoadMapInstanceType(map));
+}
+
Node* CodeStubAssembler::IsJSReceiver(Node* object) {
- STATIC_ASSERT(LAST_JS_OBJECT_TYPE == LAST_TYPE);
- return IsJSReceiverInstanceType(LoadInstanceType(object));
+ return IsJSReceiverMap(LoadMap(object));
}
-Node* CodeStubAssembler::IsJSReceiverMap(Node* map) {
+Node* CodeStubAssembler::IsJSObjectMap(Node* map) {
STATIC_ASSERT(LAST_JS_OBJECT_TYPE == LAST_TYPE);
- return IsJSReceiverInstanceType(LoadMapInstanceType(map));
+ CSA_ASSERT(this, IsMap(map));
+ return Int32GreaterThanOrEqual(LoadMapInstanceType(map),
+ Int32Constant(FIRST_JS_OBJECT_TYPE));
}
Node* CodeStubAssembler::IsJSObject(Node* object) {
- STATIC_ASSERT(LAST_JS_OBJECT_TYPE == LAST_TYPE);
- return Int32GreaterThanOrEqual(LoadInstanceType(object),
- Int32Constant(FIRST_JS_RECEIVER_TYPE));
+ return IsJSObjectMap(LoadMap(object));
}
Node* CodeStubAssembler::IsJSGlobalProxy(Node* object) {
« no previous file with comments | « src/code-stub-assembler.h ('k') | src/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698