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

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

Issue 2385423005: [stubs] Implement fast TF Builtin for Object.create (Closed)
Patch Set: addressing nits Created 4 years, 2 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
Index: src/code-stub-assembler.h
diff --git a/src/code-stub-assembler.h b/src/code-stub-assembler.h
index 8ec67ee82611f8a8907628cc5a59595ec5b2b3ab..5686fea3ef7b631446b230996fd84b2a00e29dcb 100644
--- a/src/code-stub-assembler.h
+++ b/src/code-stub-assembler.h
@@ -188,6 +188,11 @@ class CodeStubAssembler : public compiler::CodeAssembler {
if_notequal);
}
+ void BranchIfJSReceiver(compiler::Node* object, Label* if_true,
+ Label* if_false);
+ void BranchIfJSObject(compiler::Node* object, Label* if_true,
+ Label* if_false);
+
void BranchIfFastJSArray(compiler::Node* object, compiler::Node* context,
Label* if_true, Label* if_false);
@@ -223,6 +228,8 @@ class CodeStubAssembler : public compiler::CodeAssembler {
compiler::Node* LoadMap(compiler::Node* object);
// Load the instance type of an HeapObject.
compiler::Node* LoadInstanceType(compiler::Node* object);
+ // Compare the instance the type of the object against the provided one.
+ compiler::Node* HasInstanceType(compiler::Node* object, InstanceType type);
// Checks that given heap object has given instance type.
void AssertInstanceType(compiler::Node* object, InstanceType instance_type);
// Load the properties backing store of a JSObject.
@@ -249,6 +256,10 @@ class CodeStubAssembler : public compiler::CodeAssembler {
compiler::Node* LoadMapDescriptors(compiler::Node* map);
// Load the prototype of a map.
compiler::Node* LoadMapPrototype(compiler::Node* map);
+ // Load the prototype info of a map. The result has to be checked if it is a
+ // prototype info object or not.
+ compiler::Node* LoadMapPrototypeInfo(compiler::Node* map,
+ Label* if_has_no_proto_info);
// Load the instance size of a Map.
compiler::Node* LoadMapInstanceSize(compiler::Node* map);
// Load the inobject properties count of a Map (valid only for JSObjects).
@@ -257,6 +268,10 @@ class CodeStubAssembler : public compiler::CodeAssembler {
compiler::Node* LoadMapConstructorFunctionIndex(compiler::Node* map);
// Load the constructor of a Map (equivalent to Map::GetConstructor()).
compiler::Node* LoadMapConstructor(compiler::Node* map);
+ // Check whether the map is for an object with special properties, such as a
+ // JSProxy or an object with interceptors.
+ compiler::Node* IsSpecialReceiverMap(compiler::Node* map);
+ compiler::Node* IsSpecialReceiverInstanceType(compiler::Node* instance_type);
// Load the hash field of a name as an uint32 value.
compiler::Node* LoadNameHashField(compiler::Node* name);
@@ -335,6 +350,10 @@ class CodeStubAssembler : public compiler::CodeAssembler {
compiler::Node* object, compiler::Node* index, compiler::Node* value,
ParameterMode parameter_mode = INTEGER_PARAMETERS);
+ void StoreFieldsNoWriteBarrier(compiler::Node* start_address,
+ compiler::Node* end_address,
+ compiler::Node* value);
+
// Allocate a HeapNumber without initializing its value.
compiler::Node* AllocateHeapNumber(MutableMode mode = IMMUTABLE);
// Allocate a HeapNumber with a specific value.
@@ -382,6 +401,19 @@ class CodeStubAssembler : public compiler::CodeAssembler {
compiler::Node* index,
compiler::Node* input);
+ compiler::Node* AllocateJSObjectFromMap(compiler::Node* map,
+ compiler::Node* properties = nullptr,
+ compiler::Node* elements = nullptr);
+
+ void InitializeJSObjectFromMap(compiler::Node* object, compiler::Node* map,
+ compiler::Node* size,
+ compiler::Node* properties = nullptr,
+ compiler::Node* elements = nullptr);
+
+ void InitializeJSObjectBody(compiler::Node* object, compiler::Node* map,
+ compiler::Node* size,
+ int start_offset = JSObject::kHeaderSize);
+
// Allocate a JSArray without elements and initialize the header fields.
compiler::Node* AllocateUninitializedJSArrayWithoutElements(
ElementsKind kind, compiler::Node* array_map, compiler::Node* length,

Powered by Google App Engine
This is Rietveld 408576698