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

Unified Diff: src/builtins/builtins-object.cc

Issue 2436893003: [stubs] Cleanup CSA::BitFieldDecode() and friends. (Closed)
Patch Set: Addressing comments 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
« no previous file with comments | « src/builtins/builtins-number.cc ('k') | src/builtins/builtins-sharedarraybuffer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/builtins-object.cc
diff --git a/src/builtins/builtins-object.cc b/src/builtins/builtins-object.cc
index 6cc2d705b4f556585f60c1793fdfb8207a6d6d13..3588304a1c34628c69245a65320b09b368630ca7 100644
--- a/src/builtins/builtins-object.cc
+++ b/src/builtins/builtins-object.cc
@@ -488,17 +488,11 @@ void Builtins::Generate_ObjectCreate(CodeStubAssembler* a) {
a->GotoUnless(a->WordEqual(a->LoadElements(properties),
a->LoadRoot(Heap::kEmptyFixedArrayRootIndex)),
&call_runtime);
- // Jump to the runtime for slow objects.
+ // Handle dictionary objects or fast objects with properties in runtime.
Node* bit_field3 = a->LoadMapBitField3(properties_map);
- Node* is_fast_map = a->Word32Equal(
- a->BitFieldDecode<Map::DictionaryMap>(bit_field3), a->Int32Constant(0));
- a->GotoUnless(is_fast_map, &call_runtime);
-
- a->Branch(
- a->WordEqual(
- a->BitFieldDecodeWord<Map::NumberOfOwnDescriptorsBits>(bit_field3),
- a->IntPtrConstant(0)),
- &no_properties, &call_runtime);
+ a->GotoIf(a->IsSetWord32<Map::DictionaryMap>(bit_field3), &call_runtime);
+ a->Branch(a->IsSetWord32<Map::NumberOfOwnDescriptorsBits>(bit_field3),
+ &call_runtime, &no_properties);
}
// Create a new object with the given prototype.
« no previous file with comments | « src/builtins/builtins-number.cc ('k') | src/builtins/builtins-sharedarraybuffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698