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/builtins.cc

Issue 3218010: Fix mozilla and debug check failures.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: 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
« no previous file with comments | « no previous file | test/mozilla/mozilla.status » ('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 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 FixedArray* elms = FixedArray::cast(elms_obj); 658 FixedArray* elms = FixedArray::cast(elms_obj);
659 JSArray* array = JSArray::cast(receiver); 659 JSArray* array = JSArray::cast(receiver);
660 ASSERT(array->HasFastElements()); 660 ASSERT(array->HasFastElements());
661 661
662 int len = Smi::cast(array->length())->value(); 662 int len = Smi::cast(array->length())->value();
663 663
664 int n_arguments = args.length() - 1; 664 int n_arguments = args.length() - 1;
665 665
666 // Return empty array when no arguments are supplied. 666 // Return empty array when no arguments are supplied.
667 if (n_arguments == 0) { 667 if (n_arguments == 0) {
668 // No handle scope needed since we return directly. 668 Object* result = AllocateEmptyJSArray();
669 return *Factory::NewJSArray(0); 669 if (result->IsFailure()) return result;
670 return JSArray::cast(result);
670 } 671 }
671 672
672 int relative_start = 0; 673 int relative_start = 0;
673 Object* arg1 = args[1]; 674 Object* arg1 = args[1];
674 if (arg1->IsSmi()) { 675 if (arg1->IsSmi()) {
675 relative_start = Smi::cast(arg1)->value(); 676 relative_start = Smi::cast(arg1)->value();
676 } else if (!arg1->IsUndefined()) { 677 } else if (!arg1->IsUndefined()) {
677 return CallJsBuiltin("ArraySplice", args); 678 return CallJsBuiltin("ArraySplice", args);
678 } 679 }
679 int actual_start = (relative_start < 0) ? Max(len + relative_start, 0) 680 int actual_start = (relative_start < 0) ? Max(len + relative_start, 0)
(...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after
1532 if (entry->contains(pc)) { 1533 if (entry->contains(pc)) {
1533 return names_[i]; 1534 return names_[i];
1534 } 1535 }
1535 } 1536 }
1536 } 1537 }
1537 return NULL; 1538 return NULL;
1538 } 1539 }
1539 1540
1540 1541
1541 } } // namespace v8::internal 1542 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mozilla/mozilla.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698