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

Side by Side Diff: src/code-stubs-hydrogen.cc

Issue 132373011: A64: Synchronize with r17635. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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/code-stubs.cc ('k') | src/codegen.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 954 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 return result; 965 return result;
966 } 966 }
967 967
968 968
969 Handle<Code> BinaryOpStub::GenerateCode(Isolate* isolate) { 969 Handle<Code> BinaryOpStub::GenerateCode(Isolate* isolate) {
970 return DoGenerateCode(isolate, this); 970 return DoGenerateCode(isolate, this);
971 } 971 }
972 972
973 973
974 template <> 974 template <>
975 HValue* CodeStubGraphBuilder<NewStringAddStub>::BuildCodeInitializedStub() {
976 NewStringAddStub* stub = casted_stub();
977 StringAddFlags flags = stub->flags();
978 PretenureFlag pretenure_flag = stub->pretenure_flag();
979
980 HValue* left = GetParameter(NewStringAddStub::kLeft);
981 HValue* right = GetParameter(NewStringAddStub::kRight);
982
983 // Make sure that both arguments are strings if not known in advance.
984 if ((flags & STRING_ADD_CHECK_LEFT) == STRING_ADD_CHECK_LEFT) {
985 IfBuilder if_leftnotstring(this);
986 if_leftnotstring.IfNot<HIsStringAndBranch>(left);
987 if_leftnotstring.Then();
988 if_leftnotstring.Deopt("Expected string for LHS of string addition");
989 }
990 if ((flags & STRING_ADD_CHECK_RIGHT) == STRING_ADD_CHECK_RIGHT) {
991 IfBuilder if_rightnotstring(this);
992 if_rightnotstring.IfNot<HIsStringAndBranch>(right);
993 if_rightnotstring.Then();
994 if_rightnotstring.Deopt("Expected string for RHS of string addition");
995 }
996
997 return BuildStringAdd(left, right, pretenure_flag);
998 }
999
1000
1001 Handle<Code> NewStringAddStub::GenerateCode(Isolate* isolate) {
1002 return DoGenerateCode(isolate, this);
1003 }
1004
1005
1006 template <>
975 HValue* CodeStubGraphBuilder<ToBooleanStub>::BuildCodeInitializedStub() { 1007 HValue* CodeStubGraphBuilder<ToBooleanStub>::BuildCodeInitializedStub() {
976 ToBooleanStub* stub = casted_stub(); 1008 ToBooleanStub* stub = casted_stub();
977 1009
978 IfBuilder if_true(this); 1010 IfBuilder if_true(this);
979 if_true.If<HBranch>(GetParameter(0), stub->GetTypes()); 1011 if_true.If<HBranch>(GetParameter(0), stub->GetTypes());
980 if_true.Then(); 1012 if_true.Then();
981 if_true.Return(graph()->GetConstant1()); 1013 if_true.Return(graph()->GetConstant1());
982 if_true.Else(); 1014 if_true.Else();
983 if_true.End(); 1015 if_true.End();
984 return graph()->GetConstant0(); 1016 return graph()->GetConstant0();
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
1234 Add<HStoreNamedField>(js_function, HObjectAccess::ForElementsPointer(), 1266 Add<HStoreNamedField>(js_function, HObjectAccess::ForElementsPointer(),
1235 empty_fixed_array); 1267 empty_fixed_array);
1236 Add<HStoreNamedField>(js_function, HObjectAccess::ForLiteralsPointer(), 1268 Add<HStoreNamedField>(js_function, HObjectAccess::ForLiteralsPointer(),
1237 empty_fixed_array); 1269 empty_fixed_array);
1238 Add<HStoreNamedField>(js_function, HObjectAccess::ForPrototypeOrInitialMap(), 1270 Add<HStoreNamedField>(js_function, HObjectAccess::ForPrototypeOrInitialMap(),
1239 graph()->GetConstantHole()); 1271 graph()->GetConstantHole());
1240 Add<HStoreNamedField>(js_function, 1272 Add<HStoreNamedField>(js_function,
1241 HObjectAccess::ForSharedFunctionInfoPointer(), 1273 HObjectAccess::ForSharedFunctionInfoPointer(),
1242 shared_info); 1274 shared_info);
1243 Add<HStoreNamedField>(js_function, HObjectAccess::ForFunctionContextPointer(), 1275 Add<HStoreNamedField>(js_function, HObjectAccess::ForFunctionContextPointer(),
1244 shared_info);
1245 Add<HStoreNamedField>(js_function, HObjectAccess::ForFunctionContextPointer(),
1246 context()); 1276 context());
1247 1277
1248 // Initialize the code pointer in the function to be the one 1278 // Initialize the code pointer in the function to be the one
1249 // found in the shared function info object. 1279 // found in the shared function info object.
1250 // But first check if there is an optimized version for our context. 1280 // But first check if there is an optimized version for our context.
1251 if (FLAG_cache_optimized_code) { 1281 if (FLAG_cache_optimized_code) {
1252 BuildInstallFromOptimizedCodeMap(js_function, shared_info, native_context); 1282 BuildInstallFromOptimizedCodeMap(js_function, shared_info, native_context);
1253 } else { 1283 } else {
1254 BuildInstallCode(js_function, shared_info); 1284 BuildInstallCode(js_function, shared_info);
1255 } 1285 }
1256 1286
1257 return js_function; 1287 return js_function;
1258 } 1288 }
1259 1289
1260 1290
1261 Handle<Code> FastNewClosureStub::GenerateCode(Isolate* isolate) { 1291 Handle<Code> FastNewClosureStub::GenerateCode(Isolate* isolate) {
1262 return DoGenerateCode(isolate, this); 1292 return DoGenerateCode(isolate, this);
1263 } 1293 }
1264 1294
1265 1295
1266 } } // namespace v8::internal 1296 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/code-stubs.cc ('k') | src/codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698