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

Side by Side Diff: src/full-codegen.cc

Issue 3388005: Make the CompareStub and the UnaryOpStub accept smi inputs.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: x64 and ARM port Created 10 years, 3 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
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 break; 317 break;
318 case Slot::CONTEXT: 318 case Slot::CONTEXT:
319 case Slot::LOOKUP: 319 case Slot::LOOKUP:
320 UNREACHABLE(); 320 UNREACHABLE();
321 } 321 }
322 return offset; 322 return offset;
323 } 323 }
324 324
325 325
326 bool FullCodeGenerator::ShouldInlineSmiCase(Token::Value op) { 326 bool FullCodeGenerator::ShouldInlineSmiCase(Token::Value op) {
327 // TODO(kasperl): Once the compare stub allows leaving out the
328 // inlined smi case, we should get rid of this check.
329 if (Token::IsCompareOp(op)) return true;
330 // TODO(kasperl): Once the unary bit not stub allows leaving out
331 // the inlined smi case, we should get rid of this check.
332 if (op == Token::BIT_NOT) return true;
333 // Inline smi case inside loops, but not division and modulo which 327 // Inline smi case inside loops, but not division and modulo which
334 // are too complicated and take up too much space. 328 // are too complicated and take up too much space.
335 return (op != Token::DIV) && (op != Token::MOD) && (loop_depth_ > 0); 329 if (op == Token::DIV ||op == Token::MOD) return false;
330 if (FLAG_always_inline_smi_code) return true;
331 return loop_depth_ > 0;
336 } 332 }
337 333
338 334
339 void FullCodeGenerator::PrepareTest(Label* materialize_true, 335 void FullCodeGenerator::PrepareTest(Label* materialize_true,
340 Label* materialize_false, 336 Label* materialize_false,
341 Label** if_true, 337 Label** if_true,
342 Label** if_false, 338 Label** if_false,
343 Label** fall_through) { 339 Label** fall_through) {
344 switch (context_) { 340 switch (context_) {
345 case Expression::kUninitialized: 341 case Expression::kUninitialized:
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
1138 ASSERT(args->length() == 1); 1134 ASSERT(args->length() == 1);
1139 VisitForValue(args->at(0), kStack); 1135 VisitForValue(args->at(0), kStack);
1140 __ CallRuntime(Runtime::kRegExpCloneResult, 1); 1136 __ CallRuntime(Runtime::kRegExpCloneResult, 1);
1141 Apply(context_, result_register()); 1137 Apply(context_, result_register());
1142 } 1138 }
1143 1139
1144 #undef __ 1140 #undef __
1145 1141
1146 1142
1147 } } // namespace v8::internal 1143 } } // namespace v8::internal
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698