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

Side by Side Diff: src/jump-target.cc

Issue 1279001: Revert "Inline floating point compare" (Closed)
Patch Set: Created 10 years, 9 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
« no previous file with comments | « src/jump-target.h ('k') | src/x64/codegen-x64.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 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 DECLARE_ARGCHECK_VARS(arg); 283 DECLARE_ARGCHECK_VARS(arg);
284 284
285 cgen()->frame()->Push(arg); 285 cgen()->frame()->Push(arg);
286 DoBranch(cc, hint); 286 DoBranch(cc, hint);
287 *arg = cgen()->frame()->Pop(); 287 *arg = cgen()->frame()->Pop();
288 288
289 ASSERT_ARGCHECK(arg); 289 ASSERT_ARGCHECK(arg);
290 } 290 }
291 291
292 292
293 void JumpTarget::Branch(Condition cc, Result* arg0, Result* arg1, Hint hint) {
294 ASSERT(cgen()->has_valid_frame());
295
296 // We want to check that non-frame registers at the call site stay in
297 // the same registers on the fall-through branch.
298 DECLARE_ARGCHECK_VARS(arg0);
299 DECLARE_ARGCHECK_VARS(arg1);
300
301 cgen()->frame()->Push(arg0);
302 cgen()->frame()->Push(arg1);
303 DoBranch(cc, hint);
304 *arg1 = cgen()->frame()->Pop();
305 *arg0 = cgen()->frame()->Pop();
306
307 ASSERT_ARGCHECK(arg0);
308 ASSERT_ARGCHECK(arg1);
309 }
310
311
312 void BreakTarget::Branch(Condition cc, Result* arg, Hint hint) { 293 void BreakTarget::Branch(Condition cc, Result* arg, Hint hint) {
313 ASSERT(cgen()->has_valid_frame()); 294 ASSERT(cgen()->has_valid_frame());
314 295
315 int count = cgen()->frame()->height() - expected_height_; 296 int count = cgen()->frame()->height() - expected_height_;
316 if (count > 0) { 297 if (count > 0) {
317 // We negate and branch here rather than using DoBranch's negate 298 // We negate and branch here rather than using DoBranch's negate
318 // and branch. This gives us a hook to remove statement state 299 // and branch. This gives us a hook to remove statement state
319 // from the frame. 300 // from the frame.
320 JumpTarget fall_through; 301 JumpTarget fall_through;
321 // Branch to fall through will not negate, because it is a 302 // Branch to fall through will not negate, because it is a
(...skipping 21 matching lines...) Expand all
343 324
344 void JumpTarget::Bind(Result* arg) { 325 void JumpTarget::Bind(Result* arg) {
345 if (cgen()->has_valid_frame()) { 326 if (cgen()->has_valid_frame()) {
346 cgen()->frame()->Push(arg); 327 cgen()->frame()->Push(arg);
347 } 328 }
348 DoBind(); 329 DoBind();
349 *arg = cgen()->frame()->Pop(); 330 *arg = cgen()->frame()->Pop();
350 } 331 }
351 332
352 333
353 void JumpTarget::Bind(Result* arg0, Result* arg1) {
354 if (cgen()->has_valid_frame()) {
355 cgen()->frame()->Push(arg0);
356 cgen()->frame()->Push(arg1);
357 }
358 DoBind();
359 *arg1 = cgen()->frame()->Pop();
360 *arg0 = cgen()->frame()->Pop();
361 }
362
363
364 void JumpTarget::AddReachingFrame(VirtualFrame* frame) { 334 void JumpTarget::AddReachingFrame(VirtualFrame* frame) {
365 ASSERT(reaching_frames_.length() == merge_labels_.length()); 335 ASSERT(reaching_frames_.length() == merge_labels_.length());
366 ASSERT(entry_frame_ == NULL); 336 ASSERT(entry_frame_ == NULL);
367 Label fresh; 337 Label fresh;
368 merge_labels_.Add(fresh); 338 merge_labels_.Add(fresh);
369 reaching_frames_.Add(frame); 339 reaching_frames_.Add(frame);
370 } 340 }
371 341
372 342
373 // ------------------------------------------------------------------------- 343 // -------------------------------------------------------------------------
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 temp.CopyTo(this); 414 temp.CopyTo(this);
445 temp.Unuse(); 415 temp.Unuse();
446 416
447 #ifdef DEBUG 417 #ifdef DEBUG
448 is_shadowing_ = false; 418 is_shadowing_ = false;
449 #endif 419 #endif
450 } 420 }
451 421
452 422
453 } } // namespace v8::internal 423 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/jump-target.h ('k') | src/x64/codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698