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

Unified Diff: src/stub-cache.cc

Issue 8187: Serendipitously arrange the tags so that String.length() becomes a branch-fre... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 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/stub-cache.cc
===================================================================
--- src/stub-cache.cc (revision 595)
+++ src/stub-cache.cc (working copy)
@@ -263,14 +263,14 @@
}
-Object* StubCache::ComputeKeyedLoadShortStringLength(String* name,
- String* receiver) {
+Object* StubCache::ComputeKeyedLoadStringLength(String* name,
+ String* receiver) {
Code::Flags flags =
Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CALLBACKS);
Object* code = receiver->map()->FindInCodeCache(name, flags);
if (code->IsUndefined()) {
KeyedLoadStubCompiler compiler;
- code = compiler.CompileLoadShortStringLength(name);
+ code = compiler.CompileLoadStringLength(name);
if (code->IsFailure()) return code;
LOG(CodeCreateEvent("KeyedLoadIC", Code::cast(code), name));
Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
@@ -280,40 +280,6 @@
}
-Object* StubCache::ComputeKeyedLoadMediumStringLength(String* name,
- String* receiver) {
- Code::Flags flags =
- Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CALLBACKS);
- Object* code = receiver->map()->FindInCodeCache(name, flags);
- if (code->IsUndefined()) {
- KeyedLoadStubCompiler compiler;
- code = compiler.CompileLoadMediumStringLength(name);
- if (code->IsFailure()) return code;
- LOG(CodeCreateEvent("KeyedLoadIC", Code::cast(code), name));
- Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
- if (result->IsFailure()) return result;
- }
- return code;
-}
-
-
-Object* StubCache::ComputeKeyedLoadLongStringLength(String* name,
- String* receiver) {
- Code::Flags flags =
- Code::ComputeMonomorphicFlags(Code::KEYED_LOAD_IC, CALLBACKS);
- Object* code = receiver->map()->FindInCodeCache(name, flags);
- if (code->IsUndefined()) {
- KeyedLoadStubCompiler compiler;
- code = compiler.CompileLoadLongStringLength(name);
- if (code->IsFailure()) return code;
- LOG(CodeCreateEvent("KeyedLoadIC", Code::cast(code), name));
- Object* result = receiver->map()->UpdateCodeCache(name, Code::cast(code));
- if (result->IsFailure()) return result;
- }
- return code;
-}
-
-
Object* StubCache::ComputeKeyedLoadFunctionPrototype(String* name,
JSFunction* receiver) {
Code::Flags flags =

Powered by Google App Engine
This is Rietveld 408576698