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

Side by Side Diff: src/ic.cc

Issue 395713002: Allow embedding of ConsString objects into code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed moar comments by Yang Guo. Created 6 years, 5 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/assembler-ia32-inl.h ('k') | src/mips/assembler-mips-inl.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/arguments.h" 9 #include "src/arguments.h"
10 #include "src/codegen.h" 10 #include "src/codegen.h"
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 case FIELD: { 985 case FIELD: {
986 FieldIndex field = lookup->GetFieldIndex(); 986 FieldIndex field = lookup->GetFieldIndex();
987 if (object.is_identical_to(holder)) { 987 if (object.is_identical_to(holder)) {
988 return SimpleFieldLoad(field); 988 return SimpleFieldLoad(field);
989 } 989 }
990 return compiler.CompileLoadField( 990 return compiler.CompileLoadField(
991 type, holder, name, field, lookup->representation()); 991 type, holder, name, field, lookup->representation());
992 } 992 }
993 case CONSTANT: { 993 case CONSTANT: {
994 Handle<Object> constant(lookup->GetConstant(), isolate()); 994 Handle<Object> constant(lookup->GetConstant(), isolate());
995 // TODO(2803): Don't compute a stub for cons strings because they cannot
996 // be embedded into code.
997 if (constant->IsConsString()) break;
998 return compiler.CompileLoadConstant(type, holder, name, constant); 995 return compiler.CompileLoadConstant(type, holder, name, constant);
999 } 996 }
1000 case NORMAL: 997 case NORMAL:
1001 if (kind() != Code::LOAD_IC) break; 998 if (kind() != Code::LOAD_IC) break;
1002 if (holder->IsGlobalObject()) { 999 if (holder->IsGlobalObject()) {
1003 Handle<GlobalObject> global = Handle<GlobalObject>::cast(holder); 1000 Handle<GlobalObject> global = Handle<GlobalObject>::cast(holder);
1004 Handle<PropertyCell> cell( 1001 Handle<PropertyCell> cell(
1005 global->GetPropertyCell(lookup), isolate()); 1002 global->GetPropertyCell(lookup), isolate());
1006 Handle<Code> code = compiler.CompileLoadGlobal( 1003 Handle<Code> code = compiler.CompileLoadGlobal(
1007 type, global, cell, name, lookup->IsDontDelete()); 1004 type, global, cell, name, lookup->IsDontDelete());
(...skipping 2085 matching lines...) Expand 10 before | Expand all | Expand 10 after
3093 #undef ADDR 3090 #undef ADDR
3094 }; 3091 };
3095 3092
3096 3093
3097 Address IC::AddressFromUtilityId(IC::UtilityId id) { 3094 Address IC::AddressFromUtilityId(IC::UtilityId id) {
3098 return IC_utilities[id]; 3095 return IC_utilities[id];
3099 } 3096 }
3100 3097
3101 3098
3102 } } // namespace v8::internal 3099 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/assembler-ia32-inl.h ('k') | src/mips/assembler-mips-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698