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

Side by Side Diff: src/ic.h

Issue 136443006: Remove special charAt and charCodeAt handling in the ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/ic.cc » ('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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 276
277 Address address() const { return address_; } 277 Address address() const { return address_; }
278 278
279 IC::UtilityId id() const { return id_; } 279 IC::UtilityId id() const { return id_; }
280 private: 280 private:
281 Address address_; 281 Address address_;
282 IC::UtilityId id_; 282 IC::UtilityId id_;
283 }; 283 };
284 284
285 285
286 enum StringStubFeedback {
287 DEFAULT_STRING_STUB = 0,
288 STRING_INDEX_OUT_OF_BOUNDS = 1
289 };
290
291
292 class CallICBase: public IC { 286 class CallICBase: public IC {
293 public: 287 public:
294 // ExtraICState bits
295 class StringStubState: public BitField<StringStubFeedback, 0, 1> {};
296 static ExtraICState ComputeExtraICState(StringStubFeedback feedback) {
297 return StringStubState::encode(feedback);
298 }
299
300 // Returns a JSFunction or a Failure. 288 // Returns a JSFunction or a Failure.
301 MUST_USE_RESULT MaybeObject* LoadFunction(Handle<Object> object, 289 MUST_USE_RESULT MaybeObject* LoadFunction(Handle<Object> object,
302 Handle<String> name); 290 Handle<String> name);
303 291
304 protected: 292 protected:
305 CallICBase(Code::Kind kind, Isolate* isolate) 293 CallICBase(Code::Kind kind, Isolate* isolate)
306 : IC(EXTRA_CALL_FRAME, isolate), kind_(kind) {} 294 : IC(EXTRA_CALL_FRAME, isolate), kind_(kind) {}
307 295
308 // Compute a monomorphic stub if possible, otherwise return a null handle. 296 // Compute a monomorphic stub if possible, otherwise return a null handle.
309 Handle<Code> ComputeMonomorphicStub(LookupResult* lookup, 297 Handle<Code> ComputeMonomorphicStub(LookupResult* lookup,
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); 1005 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss);
1018 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); 1006 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss);
1019 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_MissWithAllocationSite); 1007 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_MissWithAllocationSite);
1020 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); 1008 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss);
1021 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); 1009 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss);
1022 1010
1023 1011
1024 } } // namespace v8::internal 1012 } } // namespace v8::internal
1025 1013
1026 #endif // V8_IC_H_ 1014 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698