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

Side by Side Diff: src/code-stubs.h

Issue 111573003: Hydrogen: Re-use regular comparisons infrastructure for switch statements (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: added comment Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « src/ast.h ('k') | src/hydrogen.h » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1169 virtual void Generate(MacroAssembler* masm); 1169 virtual void Generate(MacroAssembler* masm);
1170 1170
1171 void set_known_map(Handle<Map> map) { known_map_ = map; } 1171 void set_known_map(Handle<Map> map) { known_map_ = map; }
1172 1172
1173 static void DecodeMinorKey(int minor_key, 1173 static void DecodeMinorKey(int minor_key,
1174 CompareIC::State* left_state, 1174 CompareIC::State* left_state,
1175 CompareIC::State* right_state, 1175 CompareIC::State* right_state,
1176 CompareIC::State* handler_state, 1176 CompareIC::State* handler_state,
1177 Token::Value* op); 1177 Token::Value* op);
1178 1178
1179 static CompareIC::State CompareState(int minor_key) {
1180 return static_cast<CompareIC::State>(HandlerStateField::decode(minor_key));
1181 }
1182
1183 virtual InlineCacheState GetICState(); 1179 virtual InlineCacheState GetICState();
1184 1180
1185 private: 1181 private:
1186 class OpField: public BitField<int, 0, 3> { }; 1182 class OpField: public BitField<int, 0, 3> { };
1187 class LeftStateField: public BitField<int, 3, 4> { }; 1183 class LeftStateField: public BitField<int, 3, 4> { };
1188 class RightStateField: public BitField<int, 7, 4> { }; 1184 class RightStateField: public BitField<int, 7, 4> { };
1189 class HandlerStateField: public BitField<int, 11, 4> { }; 1185 class HandlerStateField: public BitField<int, 11, 4> { };
1190 1186
1191 virtual void FinishCode(Handle<Code> code) { 1187 virtual void FinishCode(Handle<Code> code) {
1192 code->set_stub_info(MinorKey()); 1188 code->set_stub_info(MinorKey());
(...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after
2348 int MinorKey() { return 0; } 2344 int MinorKey() { return 0; }
2349 2345
2350 void Generate(MacroAssembler* masm); 2346 void Generate(MacroAssembler* masm);
2351 2347
2352 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub); 2348 DISALLOW_COPY_AND_ASSIGN(ProfileEntryHookStub);
2353 }; 2349 };
2354 2350
2355 } } // namespace v8::internal 2351 } } // namespace v8::internal
2356 2352
2357 #endif // V8_CODE_STUBS_H_ 2353 #endif // V8_CODE_STUBS_H_
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/hydrogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698