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

Unified Diff: src/code-stubs.cc

Issue 498283002: Change more PlatformCodeStubs to encode properties in the minor key. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix instanceof Created 6 years, 4 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-stubs.h ('k') | src/codegen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index 9b841225faaa365df13357bd8b0af6ef9f433f59..9d4bd232878005e59ed3fdd38b3d022ff1980db3 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -674,7 +674,7 @@ void CreateAllocationSiteStub::GenerateAheadOfTime(Isolate* isolate) {
void StoreElementStub::Generate(MacroAssembler* masm) {
- switch (elements_kind_) {
+ switch (elements_kind()) {
case FAST_ELEMENTS:
case FAST_HOLEY_ELEMENTS:
case FAST_SMI_ELEMENTS:
@@ -699,9 +699,27 @@ void StoreElementStub::Generate(MacroAssembler* masm) {
}
+void ArgumentsAccessStub::Generate(MacroAssembler* masm) {
+ switch (type()) {
+ case READ_ELEMENT:
+ GenerateReadElement(masm);
+ break;
+ case NEW_SLOPPY_FAST:
+ GenerateNewSloppyFast(masm);
+ break;
+ case NEW_SLOPPY_SLOW:
+ GenerateNewSloppySlow(masm);
+ break;
+ case NEW_STRICT:
+ GenerateNewStrict(masm);
+ break;
+ }
+}
+
+
void ArgumentsAccessStub::PrintName(OStream& os) const { // NOLINT
os << "ArgumentsAccessStub_";
- switch (type_) {
+ switch (type()) {
case READ_ELEMENT:
os << "ReadElement";
break;
@@ -720,7 +738,7 @@ void ArgumentsAccessStub::PrintName(OStream& os) const { // NOLINT
void CallFunctionStub::PrintName(OStream& os) const { // NOLINT
- os << "CallFunctionStub_Args" << argc_;
+ os << "CallFunctionStub_Args" << argc();
}
@@ -732,7 +750,7 @@ void CallConstructStub::PrintName(OStream& os) const { // NOLINT
void ArrayConstructorStub::PrintName(OStream& os) const { // NOLINT
os << "ArrayConstructorStub";
- switch (argument_count_) {
+ switch (argument_count()) {
case ANY:
os << "_Any";
break;
@@ -946,7 +964,8 @@ void StoreFieldStub::InstallDescriptors(Isolate* isolate) {
ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate)
- : PlatformCodeStub(isolate), argument_count_(ANY) {
+ : PlatformCodeStub(isolate) {
+ minor_key_ = ArgumentCountBits::encode(ANY);
ArrayConstructorStubBase::GenerateStubsAheadOfTime(isolate);
}
@@ -955,11 +974,11 @@ ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate,
int argument_count)
: PlatformCodeStub(isolate) {
if (argument_count == 0) {
- argument_count_ = NONE;
+ minor_key_ = ArgumentCountBits::encode(NONE);
} else if (argument_count == 1) {
- argument_count_ = ONE;
+ minor_key_ = ArgumentCountBits::encode(ONE);
} else if (argument_count >= 2) {
- argument_count_ = MORE_THAN_ONE;
+ minor_key_ = ArgumentCountBits::encode(MORE_THAN_ONE);
} else {
UNREACHABLE();
}
« no previous file with comments | « src/code-stubs.h ('k') | src/codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698