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

Side by Side Diff: src/ast.cc

Issue 22715004: Version 3.20.15 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Add TypedArray API and correctness patches r16033 and r16084 Created 7 years, 4 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/ast.h ('k') | src/atomicops_internals_tsan.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 // 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 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 void UnaryOperation::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) { 297 void UnaryOperation::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) {
298 // TODO(olivf) If this Operation is used in a test context, then the 298 // TODO(olivf) If this Operation is used in a test context, then the
299 // expression has a ToBoolean stub and we want to collect the type 299 // expression has a ToBoolean stub and we want to collect the type
300 // information. However the GraphBuilder expects it to be on the instruction 300 // information. However the GraphBuilder expects it to be on the instruction
301 // corresponding to the TestContext, therefore we have to store it here and 301 // corresponding to the TestContext, therefore we have to store it here and
302 // not on the operand. 302 // not on the operand.
303 set_to_boolean_types(oracle->ToBooleanTypes(expression()->test_id())); 303 set_to_boolean_types(oracle->ToBooleanTypes(expression()->test_id()));
304 } 304 }
305 305
306 306
307 bool UnaryOperation::ResultOverwriteAllowed() {
308 switch (op_) {
309 case Token::BIT_NOT:
310 case Token::SUB:
311 return true;
312 default:
313 return false;
314 }
315 }
316
317
307 void BinaryOperation::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) { 318 void BinaryOperation::RecordToBooleanTypeFeedback(TypeFeedbackOracle* oracle) {
308 // TODO(olivf) If this Operation is used in a test context, then the right 319 // TODO(olivf) If this Operation is used in a test context, then the right
309 // hand side has a ToBoolean stub and we want to collect the type information. 320 // hand side has a ToBoolean stub and we want to collect the type information.
310 // However the GraphBuilder expects it to be on the instruction corresponding 321 // However the GraphBuilder expects it to be on the instruction corresponding
311 // to the TestContext, therefore we have to store it here and not on the 322 // to the TestContext, therefore we have to store it here and not on the
312 // right hand operand. 323 // right hand operand.
313 set_to_boolean_types(oracle->ToBooleanTypes(right()->test_id())); 324 set_to_boolean_types(oracle->ToBooleanTypes(right()->test_id()));
314 } 325 }
315 326
316 327
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after
1189 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value()); 1200 OS::SNPrintF(buffer, "%d", Smi::cast(*value_)->value());
1190 str = arr; 1201 str = arr;
1191 } else { 1202 } else {
1192 str = DoubleToCString(value_->Number(), buffer); 1203 str = DoubleToCString(value_->Number(), buffer);
1193 } 1204 }
1194 return factory->NewStringFromAscii(CStrVector(str)); 1205 return factory->NewStringFromAscii(CStrVector(str));
1195 } 1206 }
1196 1207
1197 1208
1198 } } // namespace v8::internal 1209 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ast.h ('k') | src/atomicops_internals_tsan.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698