 Chromium Code Reviews
 Chromium Code Reviews Issue 9073007:
  Store transitioned JSArray maps in global context  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
    
  
    Issue 9073007:
  Store transitioned JSArray maps in global context  (Closed) 
  Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge| OLD | NEW | 
|---|---|
| 1 // Copyright 2011 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 | 
| 11 // with the distribution. | 11 // with the distribution. | 
| (...skipping 4663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4675 Vector< Handle<Object> > arguments) { | 4675 Vector< Handle<Object> > arguments) { | 
| 4676 int argc = arguments.length(); | 4676 int argc = arguments.length(); | 
| 4677 Handle<FixedArray> elements = isolate()->factory()->NewFixedArray(argc, | 4677 Handle<FixedArray> elements = isolate()->factory()->NewFixedArray(argc, | 
| 4678 TENURED); | 4678 TENURED); | 
| 4679 for (int i = 0; i < argc; i++) { | 4679 for (int i = 0; i < argc; i++) { | 
| 4680 Handle<Object> element = arguments[i]; | 4680 Handle<Object> element = arguments[i]; | 
| 4681 if (!element.is_null()) { | 4681 if (!element.is_null()) { | 
| 4682 elements->set(i, *element); | 4682 elements->set(i, *element); | 
| 4683 } | 4683 } | 
| 4684 } | 4684 } | 
| 4685 Handle<JSArray> array = isolate()->factory()->NewJSArrayWithElements(elements, | 4685 Handle<JSArray> array = isolate()->factory()->NewJSArrayWithElements( | 
| 4686 TENURED); | 4686 elements, | 
| 
Jakob Kummerow
2012/01/23 17:16:55
nit: could put all three args onto the same line.
 
danno
2012/01/26 21:32:34
Done.
 | |
| 4687 FAST_ELEMENTS, | |
| 4688 TENURED); | |
| 4687 | 4689 | 
| 4688 ZoneList<Expression*>* args = new(zone()) ZoneList<Expression*>(2); | 4690 ZoneList<Expression*>* args = new(zone()) ZoneList<Expression*>(2); | 
| 4689 args->Add(NewLiteral(type)); | 4691 args->Add(NewLiteral(type)); | 
| 4690 args->Add(NewLiteral(array)); | 4692 args->Add(NewLiteral(array)); | 
| 4691 CallRuntime* call_constructor = new(zone()) CallRuntime(isolate(), | 4693 CallRuntime* call_constructor = new(zone()) CallRuntime(isolate(), | 
| 4692 constructor, | 4694 constructor, | 
| 4693 NULL, | 4695 NULL, | 
| 4694 args); | 4696 args); | 
| 4695 return new(zone()) Throw(isolate(), | 4697 return new(zone()) Throw(isolate(), | 
| 4696 call_constructor, | 4698 call_constructor, | 
| (...skipping 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5689 ASSERT(info->isolate()->has_pending_exception()); | 5691 ASSERT(info->isolate()->has_pending_exception()); | 
| 5690 } else { | 5692 } else { | 
| 5691 result = parser.ParseProgram(info); | 5693 result = parser.ParseProgram(info); | 
| 5692 } | 5694 } | 
| 5693 } | 5695 } | 
| 5694 info->SetFunction(result); | 5696 info->SetFunction(result); | 
| 5695 return (result != NULL); | 5697 return (result != NULL); | 
| 5696 } | 5698 } | 
| 5697 | 5699 | 
| 5698 } } // namespace v8::internal | 5700 } } // namespace v8::internal | 
| OLD | NEW |