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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 2396353002: Revert "Add Smi::Zero and replace all Smi::FromInt(0) calls" (Closed)
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 10211 matching lines...) Expand 10 before | Expand all | Expand 10 after
10222 if (!arguments->at(kBufferArg)->IsNullLiteral()) { 10222 if (!arguments->at(kBufferArg)->IsNullLiteral()) {
10223 CHECK_ALIVE(VisitForValue(arguments->at(kBufferArg))); 10223 CHECK_ALIVE(VisitForValue(arguments->at(kBufferArg)));
10224 buffer = Pop(); 10224 buffer = Pop();
10225 } else { 10225 } else {
10226 buffer = NULL; 10226 buffer = NULL;
10227 } 10227 }
10228 10228
10229 HValue* byte_offset; 10229 HValue* byte_offset;
10230 bool is_zero_byte_offset; 10230 bool is_zero_byte_offset;
10231 10231
10232 if (arguments->at(kByteOffsetArg)->IsLiteral() && 10232 if (arguments->at(kByteOffsetArg)->IsLiteral()
10233 Smi::kZero == 10233 && Smi::FromInt(0) ==
10234 *static_cast<Literal*>(arguments->at(kByteOffsetArg))->value()) { 10234 *static_cast<Literal*>(arguments->at(kByteOffsetArg))->value()) {
10235 byte_offset = Add<HConstant>(static_cast<int32_t>(0)); 10235 byte_offset = Add<HConstant>(static_cast<int32_t>(0));
10236 is_zero_byte_offset = true; 10236 is_zero_byte_offset = true;
10237 } else { 10237 } else {
10238 CHECK_ALIVE(VisitForValue(arguments->at(kByteOffsetArg))); 10238 CHECK_ALIVE(VisitForValue(arguments->at(kByteOffsetArg)));
10239 byte_offset = Pop(); 10239 byte_offset = Pop();
10240 is_zero_byte_offset = false; 10240 is_zero_byte_offset = false;
10241 DCHECK(buffer != NULL); 10241 DCHECK(buffer != NULL);
10242 } 10242 }
10243 10243
10244 CHECK_ALIVE(VisitForValue(arguments->at(kByteLengthArg))); 10244 CHECK_ALIVE(VisitForValue(arguments->at(kByteLengthArg)));
(...skipping 3038 matching lines...) Expand 10 before | Expand all | Expand 10 after
13283 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13283 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13284 } 13284 }
13285 13285
13286 #ifdef DEBUG 13286 #ifdef DEBUG
13287 graph_->Verify(false); // No full verify. 13287 graph_->Verify(false); // No full verify.
13288 #endif 13288 #endif
13289 } 13289 }
13290 13290
13291 } // namespace internal 13291 } // namespace internal
13292 } // namespace v8 13292 } // namespace v8
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698