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

Side by Side Diff: src/runtime.cc

Issue 542089: Fix bug in keyed load stub for strings.... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 11 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 | no next file » | 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-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-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 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 return CharCodeAt(subject, index); 1472 return CharCodeAt(subject, index);
1473 } 1473 }
1474 1474
1475 1475
1476 static Object* Runtime_StringCharAt(Arguments args) { 1476 static Object* Runtime_StringCharAt(Arguments args) {
1477 NoHandleAllocation ha; 1477 NoHandleAllocation ha;
1478 ASSERT(args.length() == 2); 1478 ASSERT(args.length() == 2);
1479 1479
1480 CONVERT_CHECKED(String, subject, args[0]); 1480 CONVERT_CHECKED(String, subject, args[0]);
1481 Object* index = args[1]; 1481 Object* index = args[1];
1482 return CharFromCode(CharCodeAt(subject, index)); 1482 Object* code = CharCodeAt(subject, index);
1483 if (code == Heap::nan_value()) {
1484 return Heap::undefined_value();
1485 }
1486 return CharFromCode(code);
1483 } 1487 }
1484 1488
1485 1489
1486 static Object* Runtime_CharFromCode(Arguments args) { 1490 static Object* Runtime_CharFromCode(Arguments args) {
1487 NoHandleAllocation ha; 1491 NoHandleAllocation ha;
1488 ASSERT(args.length() == 1); 1492 ASSERT(args.length() == 1);
1489 return CharFromCode(args[0]); 1493 return CharFromCode(args[0]);
1490 } 1494 }
1491 1495
1492 // Forward declarations. 1496 // Forward declarations.
(...skipping 6657 matching lines...) Expand 10 before | Expand all | Expand 10 after
8150 } else { 8154 } else {
8151 // Handle last resort GC and make sure to allow future allocations 8155 // Handle last resort GC and make sure to allow future allocations
8152 // to grow the heap without causing GCs (if possible). 8156 // to grow the heap without causing GCs (if possible).
8153 Counters::gc_last_resort_from_js.Increment(); 8157 Counters::gc_last_resort_from_js.Increment();
8154 Heap::CollectAllGarbage(false); 8158 Heap::CollectAllGarbage(false);
8155 } 8159 }
8156 } 8160 }
8157 8161
8158 8162
8159 } } // namespace v8::internal 8163 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698